package com.lakeworks.service.impl;

import com.lakeworks.common.core.text.Convert;
import com.lakeworks.common.domain.ticket.TktDecision;
import com.lakeworks.mapper.TktDecisionMapper;
import com.lakeworks.service.ITktDecisionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 工单决策Service业务层处理
 *
 * @author lake
 * @date 2023-07-17
 */
@Service
public class TktDecisionServiceImpl implements ITktDecisionService {
    @Autowired
    private TktDecisionMapper tktDecisionMapper;

    /**
     * 查询工单决策
     *
     * @param id 工单决策主键
     * @return 工单决策
     */
    @Override
    public TktDecision selectTktDecisionById(Long id) {
        return tktDecisionMapper.selectTktDecisionById(id);
    }

    /**
     * 查询工单决策列表
     *
     * @param tktDecision 工单决策
     * @return 工单决策
     */
    @Override
    public List<TktDecision> selectTktDecisionList(TktDecision tktDecision) {
        return tktDecisionMapper.selectTktDecisionList(tktDecision);
    }

    /**
     * 新增工单决策
     *
     * @param tktDecision 工单决策
     * @return 结果
     */
    @Override
    public int insertTktDecision(TktDecision tktDecision) {
        return tktDecisionMapper.insertTktDecision(tktDecision);
    }

    /**
     * 修改工单决策
     *
     * @param tktDecision 工单决策
     * @return 结果
     */
    @Override
    public int updateTktDecision(TktDecision tktDecision) {
        return tktDecisionMapper.updateTktDecision(tktDecision);
    }

    /**
     * 批量删除工单决策
     *
     * @param ids 需要删除的工单决策主键
     * @return 结果
     */
    @Override
    public int deleteTktDecisionByIds(String ids) {
        return tktDecisionMapper.deleteTktDecisionByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除工单决策信息
     *
     * @param id 工单决策主键
     * @return 结果
     */
    @Override
    public int deleteTktDecisionById(Long id) {
        return tktDecisionMapper.deleteTktDecisionById(id);
    }
}
